<div class="dataInnBottom">

    <div class="dataHeader">
        <h4>Switches</h4>
    </div>
    <div class="clr"></div>
    <div class="add-button">
        <input type="button" value="Add Switch" id="add-switch-button">
    </div>
    <?php $this->addScriptPath('../application/views/scripts/'); ?>
    <?= $this->paginationControl($this->paginator, 'Sliding', 'paginator.phtml') ?>

    <div class="clr"></div>


    <table class="dataActions" width="100%" border="0" cellpadding="0" cellspacing="0" >

        <tr>
            <th>Name
<!--        <div class="subjectBox"><span>Name</span> <a href="#"><img src="<?//= $this->baseURI(); ?>images/toparrow.gif" alt="" /></a> <a class="subjectBotClick" href="#"><img src="<?//= $this->baseURI(); ?>images/downarrow.gif" alt="" /></a>                           </div>-->
        </th>              
        <th>Cabinet</th>
        <th>ODF/kontakt</th>
        <th>Switch/port</th>
        <th>Datum patch/ping</th>
        <th>Status</th>
        <th class="allign-right">Actions</th>
        </tr>
        <?php foreach ($this->paginator as $item) { ?>
            <tr>

                <td onclick="switchDetail('<?=$item['id']?>','<?=$item['name']?>')" style="cursor: pointer;"><?php echo $item['name'] ?></td>
                <td><?php echo $item['cabinet_name']; ?></td>
                <td><?php echo $item['odf']; ?></td>
                <td><?php echo $item['port']; ?></td>
                <td><?php echo $item['datum_patch']; ?></td>
                <td class="colGray"><?php echo $item['status']; ?></td>
                <td class="allign-right"><a href="javascript:void(0)" onclick="deleteSwitch('<?=$item['id'];?>')"><img src="<?= $this->baseURI(); ?>images/cross.png" alt="" /></a> 
                    <a href="javascript:void(0)" onclick="editSwitch('<?=$item['id'];?>')"><img src="<?= $this->baseURI(); ?>images/pencil.png" alt="" /></a>
                </td>
            </tr>           
        <?php } ?>


    </table>
</div>
<script>
$( "#add-switch-button" )
        .button()
        .click(function() {
            $("#add-switch-form").load("<?= $this->baseURI(); ?>planning/switch/add");
            $( "#add-switch-form" ).dialog( "open" );
        });
</script>